<?php
namespace app\admin\validate;

use think\Validate;

class Brand extends Validate
{
    protected $rule = [
        'brand_name'  =>  'require|unique:tp_brand',//必须跟上数据库名
        'brand_url' =>  'url',

    ];


    protected $message  =   [
        'brand_name.require' => '品牌名称必须',
        'brand_name.unique'     => '品牌名称必须唯一',
        'brand_url.url'   => 'url格式不正确',
    ];

}